/**
 * @FileName: ServerApi.java
 * @Package:com.bdtop.dbl.serverapi
 * @Description: TODO
 * @author: MingjunLi
 * @date:2014-9-15
 * @version V1.0
 */

package com.bdtop.dbl.server;

import com.bdtop.dbl.model.Fence;
import com.bdtop.dbl.server.request.VerifyPhoneNumberRequest.VerifyParams;
import com.bdtop.dbl.thirdparty.asynchttp.RequestCallback;

/**
 * @ClassName: ServerApi
 * @Description: TODO
 * @author: MingjunLi
 * @date:2014-9-15
 */
public interface ServerApi {

    /**
     * 1: Verify the phone number with the verify code which is sent to the user
     * by SMS.
     * 
     * @param @param params {@link VerifyParams} contain phone number, verify
     *        code, password, and IMEI, IMSI.
     * @param @param callback response to UI from network request.
     * @return void
     * @throws
     */
    void verify(VerifyParams params, RequestCallback callback);

    /**
     * 2: Do register phone number operation.
     * 
     * @param @param phoneNumber the phone number register to server.
     * @param @param callback response to UI from network request.
     * @return void
     * @throws
     */
    void register(String phoneNumber, RequestCallback callback);

    /**
     * 3: Use the phone number & password login the remote platform.
     * 
     * @param @param phoneNumber
     * @param @param password
     * @param @param callback
     * @return void
     * @throws
     */
    void login(String phoneNumber, String password, RequestCallback callback);

    /**
     * 4: Get version info
     * 
     * @param
     * @return void
     * @throws
     */
    void getVersion(RequestCallback callback);

    /**
     * 5: Get AuthCode
     * 
     * @param @param user_number
     * @param @param callback
     * @return void
     * @throws
     */
    void getAuthCode(String user_number, RequestCallback callback);

    /**
     * 6: Reset password
     * 
     * @param @param user_number
     * @param @param password
     * @param @param verify_code
     * @param @param callback
     * @return void
     * @throws
     */
    void resetPassword(String user_number, String password, String verify_code,
            RequestCallback callback);

    /**
     * 7: Bind the device to phone. TODO
     * 
     * @param @param sign
     * @param @param IMEI
     * @param @param callback
     * @return void
     * @throws
     */
    void deviceAdd(String sign, String IMEI, RequestCallback callback);

    /**
     * 8: Get the device list.
     * 
     * @param @param loginSign
     * @param @param callback
     * @return void
     * @throws
     */
    void getDeviceList(String loginSign, RequestCallback callback);

    /**
     * 9: Delete the device
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param callback
     * @return void
     * @throws
     */
    void deviceDel(String sign, String mdn, RequestCallback callback);

    /**
     * 10: A device info
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param callback
     * @return void
     * @throws
     */
    void deviceInfo(String sign, String mdn, RequestCallback callback);

    /**
     * 11: Modify device info
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param name
     * @param @param callback
     * @return void
     * @throws
     */
    void deviceModi(String sign, String mdn, String name, Boolean power, Integer locationMode,
            String[] phones, RequestCallback callback);

    /**
     * 12: Get the device position.
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param callback
     * @return void
     * @throws
     */
    void getPosition(String sign, String mdn, RequestCallback callback);

    /**
     * 13: Get all position
     * 
     * @param @param sign
     * @param @param callback
     * @return void
     * @throws
     */
    void getAllPosition(String sign, RequestCallback callback);

    /**
     * 14: Send SMS
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param smscmd
     * @param @param callback
     * @return void
     * @throws
     */
    void sendSms(String sign, String mdn, String smscmd, RequestCallback callback);

    /**
     * 15: Get the device history track.
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param utc1
     * @param @param utc2
     * @return void
     * @throws
     */
    void getHistoryTrack(String sign, String mdn, long utc1, long utc2, RequestCallback callback);

    /**
     * 16: Get all messages
     * 
     * @param @param sign
     * @param @param callback
     * @return void
     * @throws
     */
    void getMsgs(String sign, RequestCallback callback);

    /**
     * 17: Add the fence for device.
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param fencename
     * @param @param lon
     * @param @param lat
     * @param @param radius
     * @param @param callback
     * @return void
     * @throws
     */
    void fenceAdd(String sign, String mdn, String fencename, double lon, double lat, int radius,
            RequestCallback callback);

    /**
     * 18: Delete the fence
     * 
     * @param @param sign
     * @param @param fence_id
     * @param @param callback
     * @return void
     * @throws
     */
    void fenceDel(String sign, String fence_id, RequestCallback callback);

    /**
     * 19: Set fence status
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param fence_id
     * @param @param open
     * @return void
     * @throws
     */
    void fenceSet(String sign, String mdn, String fence_id, String open, RequestCallback callback);

    /**
     * 20: Modify fence info
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param fence
     * @param @param callback
     * @return void
     * @throws
     */
    void fenceModi(String sign, String mdn, Fence fence, RequestCallback callback);

    /**
     * 21: Get all fences
     * 
     * @param @param sign
     * @param @param mdn
     * @param @param callback
     * @return void
     * @throws
     */
    void getFences(String sign, String mdn, RequestCallback callback);

    /**
     * @param @param sign
     * @param @param password
     * @param @param srcpw 
     * @param @param callback
     * @return void
     * @throws
     */
    void upodatePassword(String sign, String password,String srcpw, RequestCallback callback);

    /**
     * @param @param sign
     * @param @param startTime
     * @param @param endTime
     * @param @param callback
     * @return void
     * @throws
     */
    void getLogList(String sign, String startTime, String endTime, RequestCallback callback);

    /**
     * @param @param sign
     * @param @param imgid
     * @param @param imgName
     * @param @param imgName
     * @param @param callback
     * @return void
     * @throws
     */
    void updateImgRequest(String sign, String imgid, String imgData,
            RequestCallback callback);

    /**
     * @param @param sign
     * @param @param imgid
     * @param @param imgName
     * @param @param callback
     * @return void
     * @throws
     */
    void getImg(String sign, String imgid, RequestCallback callback);

    /**
     * TODO
     * 
     * @param @param sign
     * @param @param callback
     * @return void
     * @throws
     */
    void loginOut(String sign, RequestCallback callback);

    /**
     * TODO
     * 
     * @param @param sign
     * @param @param cid
     * @param @param callback
     * @return void
     * @throws
     */
    void updateCid(String sign, String cid, RequestCallback callback);
    
    
    void getAllDeviceInfo(String sign,RequestCallback callback);
    
    void getAddressInfo(String sign, double lon, double lat, RequestCallback callback);
}
